<?php
//广告插件
$config['plug_ad_data'] = 'CREATE TABLE IF NOT EXISTS `pan_plug_ad` (
  `id` int(11) NOT NULL,
  `pic` varchar(200) NOT NULL,
  `url` varchar(300) NOT NULL,
  `name` varchar(200) NOT NULL,
  `position` int(1) NOT NULL,
  `state` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `pan_plug_ad_pv` (
  `id` int(11) NOT NULL,
  `ad_id` int(11) NOT NULL,
  `mid` int(11) NOT NULL,
  `mktime` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


ALTER TABLE `pan_plug_ad`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `pan_plug_ad_pv`
  ADD PRIMARY KEY (`id`);


ALTER TABLE `pan_plug_ad`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE `pan_plug_ad_pv`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;';

//DROP TABLE `pan_plug_kf`; 客服
$config['plug_kf_data'] = '

CREATE TABLE IF NOT EXISTS `pan_plug_kf` (
  `id` int(11) NOT NULL,
  `kf_account` varchar(50) NOT NULL,
  `kf_headimgurl` varchar(200) NOT NULL,
  `kf_id` varchar(100) NOT NULL,
  `kf_nick` varchar(100) NOT NULL,
  `status` int(1) NOT NULL,
  `auto_accept` int(11) NOT NULL,
  `accepted_case` int(11) NOT NULL,
  `password` varchar(32) NOT NULL,
  `qz` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


ALTER TABLE `pan_plug_kf`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `kf_id` (`kf_id`),
  ADD UNIQUE KEY `kf_account` (`kf_account`);


ALTER TABLE `pan_plug_kf`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;';

//页面设计
$config['plug_page_data'] = '
CREATE TABLE IF NOT EXISTS `pan_plug_page` (
  `id` int(11) NOT NULL,
  `name` varchar(200) NOT NULL,
  `content` longtext NOT NULL,
  `page_del` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `pan_plug_page`
  ADD PRIMARY KEY (`id`); ';
$config['plug_co_phb_data'] = '
  
CREATE TABLE IF NOT EXISTS `pan_co_phb` (
  `id` int(11) NOT NULL,
  `mid` int(11) NOT NULL,
  `fs` int(11) NOT NULL,
  `jb` decimal(10,2) NOT NULL,
  `mktime` int(11) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;


ALTER TABLE `pan_co_phb`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `mid` (`mid`);


ALTER TABLE `pan_co_phb`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
  ';

$config['plug_unionid_data'] = 'ALTER TABLE `pan_member` ADD `unionid` VARCHAR(100) NOT NULL AFTER `openid`;';
$config['plug_ts_data'] = 'ALTER TABLE `pan_jb` ADD `ts` VARCHAR(200) NOT NULL AFTER `didd`;';
?>